package vip.xiaonuo.modular.manage.tsdatarecord.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import vip.xiaonuo.core.pojo.base.entity.BaseEntity;
import vip.xiaonuo.core.pojo.base.node.BaseTreeNode;

import java.util.List;

/**
 * BaseDataFolder
 *
 * @author JackLee
 * 2022/8/11 15:11
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("base_data_folder")
public class BaseDataFolder extends BaseEntity implements BaseTreeNode {
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    private Long pid;

    private String pids;

    private String name;

    private String color;

    private String icon;

    private Integer sortNum;

    @TableField(exist = false)
    private List<BaseDataFolder> children;

    @Override
    public void setChildren(List children) {
        this.children = children;
    }
}
